#include "timeserver.h"

TimeServer::TimeServer(QObject *parent)
{
    dlg = (Dialog*)parent;
}

void TimeServer::incomingConnection(qintptr socketDescriptor)
{
    TimeThread* thread = new TimeThread(socketDescriptor,0);//把对端的端口号、IP用参数的方式带给线程
    connect(thread,SIGNAL(finished()),dlg,SLOT(slotShow()));
    connect(thread,SIGNAL(finished()),thread,SLOT(deleteLater()),Qt::DirectConnection);
    thread->start();
}
